#pragma once

class Thread
{
public:
	enum ThreadStates
	{
		Running,
		ShouldPause,
		ShouldQuit
	};

protected:
	ThreadStates mState;

public:

	void setState(ThreadStates state) { 
		InterlockedCompareExchange((volatile unsigned long*)&mState, (unsigned long)state, (unsigned long)mState);
	}
	virtual bool run() = 0;
};